<template>
  <t-tooltip :content="tip" placement="bottom">
    <t-button theme="primary" variant="text" shape="square" :disabled="disable" @click="click()">
      <template #icon>
        <slot/>
      </template>
    </t-button>
  </t-tooltip>
</template>
<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: 'db-simple-item',
  emits: ['click'],
  props: {
    disable: {
      type: Boolean,
      required: false,
      default: false
    },
    tip: {
      type: String,
      required: false,
      default: ""
    }
  },
  data: () => ({}),
  methods: {
    click() {
      if (!this.disable) {
        this.$emit('click')
      }
    }
  }
});
</script>
<style scoped>

</style>
